perm filename CMP[P,JRA] blob
sn#513123 filedate 1980-05-31 generic text, type T, neo UTF8
1) GUT[P,JRA] and 2) TAG[P,JRA] 5-31-80 07:26 pages 1,1
**** File 1) GUT[P,JRA]/1P/1L
1) COMMENT ⊗ VALID 00009 PAGES
1) C REC PAGE DESCRIPTION
1) C00001 00001
1) C00002 00002 .device xgp
1) C00025 00003
1) C00028 00004 TYPE Contents
1) C00034 00005 TYPE Idlist
1) C00036 00006
1) C00040 00007
1) C00046 00008
1) C00049 00009 TYPE Character
1) C00052 ENDMK
1) C⊗;
1) .device xgp
1) .TURN ON "%";
1) .FONT 2 "baxl30"; <<normal font>>
1) .FONT 1 "BAXI30[j,red]" <<mexpr font:basi30+>>
1) .font 3 "baxb30";
1) .FONT 4 "NGB30"; <<for cap X used for cartesian product>>
1) .begin center
**** File 2) TAG[P,JRA]/1P/1L
2) COMMENT ⊗ VALID 00002 PAGES
2) C REC PAGE DESCRIPTION
2) C00001 00001
2) C00002 00002
2) C00025 ENDMK
2) C⊗;
2) .begin center
***************
**** File 1) GUT[P,JRA]/2P/84L
1) specified with algebraic asioms by Guttag and Horning. The fundamental
1) assumption is that a user will want to be able to display several distinct
**** File 2) TAG[P,JRA]/2P/78L
2) specified with algebraic axioms by Guttag and Horning. The fundamental
2) assumption is that a user will want to be able to display several distinct
***************
**** File 1) GUT[P,JRA]/2P/315L
1) .center
**** File 2) TAG[P,JRA]/2P/309L
2) .group skip 6
2) .center
***************
1) GUT[P,JRA] and 2) TAG[P,JRA] 5-31-80 07:26 pages 2,2
**** File 1) GUT[P,JRA]/2P/323L
1) [2] Kowalski, R., %1Logic for Problem Solving%1, Elsevier North Holland, Inc., 1979.
1) .nofill
1) TYPE Picture
1) Picture(make-picture(cont, bound, trans)) ← Contents(cont), Boundary(bound),
1) Translation(trans)
1) Picture-Appearance(make-picture(cont, bound, trans), coord, illum) ←
1) Compute-position(coord,trans,coord'), Contents-appearance(cont, coord'),
1) Contents(cont), Boundary(bound), Translation(trans), Coordinate(coord),
1) Coordinat(coord'), Illumination(illum)
1)
1) Picture-In(make-picture(cont, bound, trans), coord, tv) ←
1) Lies-in(coord, bound, tv), Contents(cont), Boundary(bound),
1) Translation(trans), Coordinate(coord), Truth-value(tv)
1) END TYPE Picture
1) %2
1) %1
1) TYPE Contents
1) Contents(mt-contents) ←
1) Contents(addcomponent(cont, comp, coord)) ←
1) Contents(cont), Component(comp), Coordinate(coord)
1) Contents-Appearance(mt-contents, coord, x) ←
1) %2The appearance of an empty contents at a coordinate is intentionally
1) left unspecified as yet.%1
1) Contents-Appearance(addcomponent(cont, comp, coord'), coord, illum) ←
1) Component-In(comp, minus(coord, coord'), true),
1) Contents-In(cont, coord, true),
1) Component-Appearance(comp, minus(coord, coord'), illum1),
1) Contents-Appearance(cont, coord, illum2),
1) Combine(illum1, illum2, illum)
1) Contents-Appearance(addcomponent(cont, comp, coord'), coord, illum) ←
1) Component-In(comp, minus(coord, coord'), true),
1) Contents-In(cont, coord, false),
1) Component-Appearance(comp, minus(coord, coord'), illum)
1) Contents-Appearance(addcomponent(cont, comp, coord'), coord, illum) ←
1) Component-In(comp, minus(coord, coord'), false),
1) Contents-Appearance(cont, coord, illum)
1) Contents-In(mt-contents, coord, false) ←
1) Contents-In(addcomponent(cont, comp, coord'), coord, true) ←
1) Component-In(comp, minus(coord, coord'), true)
1) Contents-In(addcomponent(cont, comp, coord'), coord, true) ←
1) Contents-In(cont, coord, true)
1) Contents-In(addcomponent(cont, comp, coord'), coord, false) ←
1) Component-In(comp, minus(coord, coord'), false),
1) Contents-In(cont, coord, false)
1) END TYPE Contents
1) TYPE Component
1) GUT[P,JRA] and 2) TAG[P,JRA] 5-31-80 07:26 pages 2,2
1) %2 In Guttag-Horning, this type is simply said to be the union of View,
1) Text, and Figure. That statement conveys the intuitive understanding
1) underlying the following, however I still feel the need for the actual
1) clauses describing it.%1
1) Component(make-vcomp(view)) ←
1) Component(make-tcomp(text)) ←
1) Component(make-fcomp(figure)) ←
1) Component-Appearance(make-vcomp(view), coord, illum) ←
1) View-Appearance(view, coord, illum)
1) Component-Appearance(make-tcomp(text), coord, illum) ←
1) Text-Appearance(text, coord, illum)
1) Component-Appearance(make-fcomp(figure), coord, illum) ←
1) Figure-Appearance(figure, coord, illum)
1) Component-In(make-vcomp(view), coord, tv) ← View-In(view, coord, tv)
1) Component-In(make-tcomp(text), coord, tv) ← Text-In(text, coord, tv)
1) Component-In(make-fcomp(figure), coord, tv) ← Figure-In(figure, coord, tv)
1) END TYPE Component
1) TYPE View
1) View(mt-view) ←
1) View(addpicture(view, coord, picture-id, picture)) ←
1) View-Appearance(mt-view, coord, x) ←
1) %2Again, we leave unspecified the appearance of the mt-view at any coordinate%1
1) View-Appearance(addpicture(v, coord', id, p), coord, illum) ←
1) Picture-In(p, minus(coord, coord'), true),
1) Picture-Appearance(p, minus(coord, coord'), illum)
1) View-Appearance(addpicture(v, coord', id, p), coord, illum) ←
1) Picture-In(p, minus(coord, coord'), false),
1) View-Appearance(v, coord, illum)
1) View-In(mt-view, coord, false) ←
1) View-In(addpicture(v, coord', id, p), coord, true) ←
1) Picture-In(p, minus(coord, coord'), true)
1) View-In(addpicture(v, coord', id, p), coord, true) ←
1) View-In(v, coord, true)
1) View-In(addpicture(v, coord', id, p), coord, false) ←
1) Picture-In(p, minus(coord, coord'), false),
1) View-In(v, coord, false)
1) FindPictures(mt-view, coord, mt-idlist) ←
1) FindPictures(addpicture(v, coord', id, p), coord, idlist-insert(id,idl)) ←
1) Picture-In(p, minus(coord, coord'), true),
1) FindPictures(v, coord, idl)
1) FindPictures(addpicture(v, coord', id, p), coord, idl) ←
1) Picture-In(p, minus(coord, coord'), false),
1) FindPictures(v, coord, idl)
1) DeletePicture(mt-view, id, mt-view) ←
1) DeletePicture(addpicture(v, coord, id, p), id, v) ←
1) DeletePicture(addpicture(v, coord, id', p), id, addpicture(v', coord, id', p)) ←
1) PictureId-equal(id, id', false),
1) DeletePicture(v, id, v')
1) GUT[P,JRA] and 2) TAG[P,JRA] 5-31-80 07:26 pages 2,2
1) END TYPE View
1) TYPE Idlist
1) %2 Sequence of PictureId%1
1) Idlist(mt-idlist) ←
1) Idlist(idlist-insert(id,idl)) ← PictureId(id), Idlist(idl)
1) END TYPE Idlist
1) TYPE Text
1) Text(mt-text) ←
1) Text(text-insert(par, txt)) ← Paragraph(par), Text(txt)
1) %2 macro: down(d) is minus(coord, times(d, unitvectordown) %1
1) Text-Appearance(mt-text, coord, x) ←
1) Text-Appearance(text-insert(par, txt), coord, illum) ←
1) Paragraph-In(par, coord, true),
1) Paragraph-Appearance(p, coord, illum)
1) Text-Appearance(text-insert(par, txt), coord, illum) ←
1) Paragraph-In(par, coord, false), Paragraph-Height(par, d),
1) Text-Appearance(txt, down(d), illum)
1) Text-In(mt-text, coord, false) ←
1) Text-In(text-insert(par, txt), coord, true) ← Paragraph-In(par, coord, true)
1) Text-In(text-insert(par, txt), coord, true) ←
1) Paragraph-Height(par, d), Text-In(txt, down(d), true)
1) Text-In(text-insert(par, txt), coord, false) ←
1) Paragraph-In(par, coord, false),
1) Paragraph-Height(par, d), Text-In(txt, down(d), false)
1) END TYPE Text
1) TYPE Paragraph
1) %2 macro: Down(d) is Minus(coord, Times(d, UnitVectorDown) %1
1) Paragraph(make-paragraph(parlooks, eng-string)) ←
1) Par-Firstline(make-paragraph(look, s), line) ←
1) Parlooks-width(look, w),
1) EngString-Firstline(s, w, line)
1) Par-Balance(make-paragraph(look, s), make-paragraph(look, s')) ←
1) Parlooks-width(look,w)
1) EngString-Balance(s, w)
1) Par-Null(make-paragraph(look,s), tv) ← String-Null(s,tv)
1) Par-Space(make-paragraph(look,s), dist) ←
1) ParLooks-Space(look, dist)
1) Par-Height(p,dist) ← Par-Null(p,true), Par-Space(p, dist)
1) Par-Height(p, dist1 + dist2) ← Par-Null(p,false),
1) Par-Firstline(p, line), Line-Height(line,dist1),
1) Par-Balance(p, p'), Par-Height(p', dist2)
1) Par-In(p, coord, true) ← Par-Null(p, false),
1) Par-Firstline(p, line), Par-Space(p, dist1),
1) Line-Ascent(line, dist2), Line-In(line, Down(dist1 + dist2), true)
1) Par-In(p, coord, true) ← Par-Null(p, false),
1) Par-Balance(p, p'), Par-Firstline(p, line),
1) Line-Height(line, dist), Par-In(p', Down(dist), true)
1) Par-In(p, coord, false) ← Par-Null(p, true)
1) GUT[P,JRA] and 2) TAG[P,JRA] 5-31-80 07:26 pages 2,2
1) Par-In(p, coord, false) ← Par-Null(p, false),
1) Par-Firstline(p, line), Par-Space(p, dist1),
1) Line-Ascent(line, dist2), Line-In(line, Down(dist1 + dist2), false),
1) Par-Balance(p, p'), Line-Height(line, dist),
1) Par-In(p', Down(dist), false)
1) Par-Appearance(p, coord, illum) ←
1) Par-Firstline(p, line), Par-Space(p, dist1),
1) Line-Ascent(line, dist2), Line-In(line, Down(dist1 + dist2), true),
1) Line-Appearance(line, Down(dist1 + dist2), illum)
1) Par-Appearance(p,coord,illum) ←
1) Par-Firstline(p, line), Par-Space(p, dist1),
1) Line-Ascent(line, dist2), Line-In(line, Down(dist1 + dist2), false),
1) Par-Balance(p, p'), Line-Height(line, dist),
1) Par-Appearance(p', Down(dist), illum)
1) END TYPE PARAGRAPH
1) TYPE EnglishString
1) EngString(mt-string) ←
1) EngString(string-insert(char, string) ← Character(char), EngString(string)
1) EngString-Firstline(mt-string, dist, mt-line) ←
1) EngString-Firstline(string-insert(c,s), d, c) ← SplitHere(s,c,d,true)
1) EngString-Firstline(string-insert(c,s), d, line-insert(c, line)) ←
1) SplitHere(s,c,d,false), Character-width(c,w),
1) EngString-Firstline(s, d-w, line)
1) EngString-Balance(mt-string, d, mt-string)←
1) EngString-Balance(string-insert(c,s), d, s) ←
1) SplitHere(s,c,d,true)
1) EngString-Balance(string-insert(c,s), d, str) ←
1) Character-width(c,w), EngString-Balance(s, d-w, str)
1) SplitHere(mt-string, c, d,true) ←
1) SplitHere(string-insert(c',s), c, d, true) ←
1) Character-Equal(c', quoteCR, true)
1) SplitHere(string-insert(c',s), c, d, true) ←
1) Character-Equal(c', quoteSpace, false),
1) Character-width(c,w), Character-width(c',w'),
1) LessThan(d, w+w',true)
1) SplitHere(string-insert(c',s), c, d, true) ←
1) LexicalBreak(c, c', true), Character-width(c, w),
1) WordFits(s, c', d-w, false)
1) SplitHere(string-insert(c',s), c, d, false) ←
1) Character-Equal(c', quoteCR, false),
1) Character-Equal(c', quoteSpace, tv1),
1) Character-width(c,w), Character-width(c',w'),
1) LessThan(d, w+w', tv2), Not(tv2,tv2'),
1) Or(tv1, tv2', true),
1) LexicalBreak(c, c', tv3), Not(tv3, tv3'),
1) Character-width(c, w), WordFits(s, c', d-w, tv4),
1) Or(tv3', tv4, true)
1) Not(true, false) ←
1) GUT[P,JRA] and 2) TAG[P,JRA] 5-31-80 07:26 pages 2,2
1) Not(false, true) ←
1) Or(true, tv, true) ←
1) Or(tv, true, true) ←
1) Or(false, false, false) ←
1) LexicalBreak(current, next, true) ←
1) Character-Equal(current, quoteSpace, true),
1) Character-Equal(next, quoteSpace, false)
1) LexicalBreak(current, next, true) ←
1) Character-Equal(current, quoteHyphen, true),
1) Character-Equal(next, quoteHyphen, false),
1) Character-Equal(next, quoteSpace, false)
1)
1) LexicalBreak(current, next, false) ←
1) Character-Equal(next, quoteSpace, true)
1) LexicalBreak(current, next, false) ←
1) Character-Equal(current, quoteSpace, false),
1) Character-Equal(current, quoteHyphen, false)
1) LexicalBreak(current, next, false) ←
1) Character-Equal(current, quoteSpace, false),
1) Character-Equal(next, quoteHyphen, true),
1) WordFits(mt-string, c, d, true) ←
1) WordFits(string-insert(c',s), c, d, true) ←
1) Character-Equal(c, quoteCR, true)
1) WordFits(string-insert(c',s), c, d, true) ←
1) Character-Equal(c, quoteSpace, true)
1) WordFits(string-insert(c',s), c, d, true) ←
1) LexicalBreak(c,c',true), Character-width(c,w),
1) LessThan(d, w, false)
1) WordFits(string-insert(c',s), c, d, true) ←
1) Character-width(c, w), Character-width(c', w'),
1) LessThan(d, w+w', false),
1) WordFits(s, c', d-w, true)
1) WordFits(string-insert(c',s), c, d, false) ←
1) Character-Equal(c, quoteCR, false),
1) Character-Equal(c, quoteSpace, false),
1) LexicalBreak(c,c',tv1), Not(tv1, tv1'),
1) Character-width(c,w), LessThan(d, w, tv2),
1) Or(tv1', tv2),
1) Character-width(c', w'),
1) LessThan(d, w+w', tv3),
1) WordFits(s, c', d-w, tv4), Not(tv4, tv4'),
1) Or(tv3, tv4', true)
1) EngString-Null(mt-string, true) ←
1) EngString-Null(string-insert(c, s), false) ←
1) END TYPE EnglishString
1) TYPE LINE
1) Line(mt-line) ←
1) Line(line-insert(c, l)) ← Character(c), Line(l)
1) GUT[P,JRA] and 2) TAG[P,JRA] 5-31-80 07:26 pages 2,2
1) %2 Line-Appearance(mt-line, coord,illum) intentionally left unspecified
1) macro: Right(d) is Minus(coord, Times(d, UnitVectorRight) %1
1) Line-Appearance(line-insert(c, ln), coord, illum) ←
1) Character-In(c, coord, true),
1) Character-Appearance(c, coord, illum)
1) Line-Appearance(line-insert(c, ln), coord, illum) ←
1) Character-In(c, coord, false), Character-width(c, w),
1) Line-Appearance(ln, Right(w), illum)
1) Line-In(mt-line, coord, false) ←
1) Line-In(line-insert(c, ln), coord, true) ←
1) Character-In(c, coord, true)
1) Line-In(line-insert(c, ln), coord, true) ←
1) Character-width(c, w),
1) Line-In(ln, Right(w), true)
1) Line-Height(ln, d1+d2) ←
1) Line-Ascent(ln,d1), Line-Descent(ln, d2)
1) Line-Ascent(mt-line, 0) ←
1) Line-Ascent(line-insert(c,ln), d) ←
1) Character-Ascent(c, d1), Line-Ascent(ln, d2),
1) Maximum(d1, d2, d)
1) Line-Descent(mt-line, 0) ←
1) Line-Descent(line-insert(c,ln), d) ←
1) Character-Descent(c, d1), Line-Descent(ln, d2),
1) Maximum(d1, d2, d)
1) Maximum(x, y, x) ← LessThan(x, y, false)
1) Maximum(x, y, y) ← LessThan(y, x, false)
1) %2I have assumed the exixtence of a LessThan predicate that returns true or false%1
1) END TYPE LINE
1) TYPE Character
1) Character(make-char(code, fig, ascent, descent, width)) ←
1) CharacterCode(code), Figure(fig), Distance(ascent),
1) Distance(descent), Distance(width)
1) Char-equal(make-char(code, fig, asc, des, w),
1) make-char(code, fig', asc', des', w')) ←
1) Char-Appearance(make-char(cd,f,a,d,w), coord, illum) ←
1) Figure-Appearance(f, coord, illum)
1) Char-In(make-char(cd, f, a, d, w), coord, true) ←
1) Figure-In(f, coord, true),
1) Increasing( a, project(coord, unitvectordown), d, true),
1) Increasing( 0, project(coord, unitvectorright), w, true)
1) Char-In(make-char(cd, f, a, d, w), coord, false) ←
1) Figure-In(f, coord, false)
1) Char-In(make-char(cd, f, a, d, w), coord, false) ←
1) Increasing( a, project(coord, unitvectordown), d, false)
1) Char-In(make-char(cd, f, a, d, w), coord, false) ←
1) Increasing( 0, project(coord, unitvectorright), w, false)
1) END TYPE Character
1) TYPE Figure
1) GUT[P,JRA] and 2) TAG[P,JRA] 5-31-80 07:26 pages 2,2
1) %2 This type is as yet unspecified. It will necessarily include specifications
1) of the Appearance and In predicates for the type.%1
1) END TYPE Figure
1) TYPE Coordinate
1) %2 This type is not yet specified. It needs at least the functions
1) minus, times, and project, and the constants unitvectorright and
1) unitvectordown. I imagine an ordinary 2-dimensional vector space will do nicely.
1) %1
1) END TYPE Coordinate
1) TYPE Distance
1) %2 again, left unspecified%1
1) END TYPE Distance
1) TYPE Font
1) Font(mt-font) ←
1) Font(addcharacter(font, char)) ←
1) Lookup(mt-font, code, x) ← %2another unspecified pathological case%1
1) Lookup(addcharacter(fnt, make-char(cd, f, a, d, w)), cd, make-char(cd, f, a, d, w)) ←
1) Lookup(addcharacter(fnt, make-char(cd, f, a, d, w)), code, c) ←
1) CharacterCode-Equal(cd, code, false),
1) Lookup(fnt, code, c)
1) END TYPE Font
**** File 2) TAG[P,JRA]/2P/318L
2) [2] Kowalski, R., %1Logic for Problem Solving%2, Elsevier North Holland, Inc., 1979.
***************